package com.itlong.cloud.app.resource;

import com.itlong.cloud.POJO.VO.app.AppForeignProjectAddressVO;
import com.itlong.cloud.POJO.VO.app.AppNewProjectAddressVO;
import com.itlong.cloud.POJO.VO.app.AppProjectAddressVO;
import com.itlong.cloud.app.service.IAppProjectAddressService;
import com.itlong.cloud.project.app.IAppProjectAddressServiceClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 *<desc>
 *     新版APP的地址信息接口代理实现类
 *</desc>
 *
 * @createDate 2017/9/28.
 */
@RestController
public class AppProjectAddressServiceResource implements IAppProjectAddressServiceClient {


    @Autowired
    IAppProjectAddressService iAppProjectAddressService;

    /**
     *  <desc>
     *      获取所有城市信息列表,首字母分组及城市ID与城市名称
     *  </desc>
     * @return
     *  @author cuiduanwu
     * @createDate 2017/9/28
     */
    @Override
    @RequestMapping(path = "/home/getCitys",method = RequestMethod.POST)
    public List<AppProjectAddressVO> getAllUsedCityInitials() throws Exception{
        return  iAppProjectAddressService.getAllUsedCityInitials();
    }

    /**
     *  <desc>
     *      app2.0获取所有城市信息列表,首字母分组及城市ID与城市名称
     *  </desc>
     * @return
     *  @author Qiang.S
     * @createDate 2019/06/18
     */
    @Override
    @RequestMapping(path = "/home/getNewCitys",method = RequestMethod.POST)
    public AppNewProjectAddressVO getNewAllUsedCityInitials() throws Exception{
        return  iAppProjectAddressService.getNewAllUsedCityInitials();
    }


    /**
     *  <desc>
     *      获取所有国家信息列表,首字母分组及国家ID与国家名称
     *  </desc>
     * @return
     *  @author shengen.T
     * @createDate 2017/9/28
     */
    @Override
    @RequestMapping(path = "/home/getCountrys" ,method = RequestMethod.POST)
    public List<AppForeignProjectAddressVO> getAllCountryInitials() throws  Exception{
        return  iAppProjectAddressService.getAllCountryInitials();
    }

}
